﻿<Controls:SinacorWindow 
                  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                  xmlns:d="http://schemas.microsoft.com/expression/blend/2008"  
                  xmlns:Custom="http://schemas.xceed.com/wpf/xaml/datagrid"
                  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
                  mc:Ignorable="d"
                  xmlns:Model="clr-namespace:Sinacor.UI.Bovespa.Clientes.Model;assembly=Sinacor.UI.Bovespa.Clientes.Model"
                  xmlns:Controls="clr-namespace:Sinacor.Infra.UI.Controls.SmartClient;assembly=Sinacor.Infra.UI.Controls"
                  WindowStartupLocation="CenterScreen" 
                  AutoContentHeight="True" 
                  AutoContentWidth="True"
                  WindowState="Normal"
                  Width="765"
                  Height="600"
                  Title="{DynamicResource Bovespa.Clientes.Label.CadastroTipoContasClientes}"
                  x:Class="Sinacor.UI.Bovespa.Clientes.View.SmartClient.CadastroTiposContasClientes" 
                  ModulePlus="False"
                  ModuleId="ORD">


    <Controls:SinacorExpanderContainer>
        <Grid.RowDefinitions>
            <RowDefinition	Height="Auto"/>
            <RowDefinition	Height="4"/>
            <RowDefinition	Height="*"
							MinHeight="150"/>
        </Grid.RowDefinitions>
        <Controls:SinacorExpander	Header="{DynamicResource Bovespa.Clientes.Label.Pesquisa}"
									Grid.Row="0"
									TabIndex="4" IsExpanded="True" x:Name="ExpPesquisa">
            <Grid>
                <Controls:SinacorLabel	HorizontalAlignment="Left"
									VerticalAlignment="Top"
									Content="{DynamicResource Bovespa.Clientes.Label.Apelido}"
									Width="65"/>
                <Controls:SinacorTextBox	HorizontalAlignment="Left"
										Margin="70,0,0,0"
										VerticalAlignment="Top"
										Width="215"
										TabIndex="1" MaxLength="20" Text="{Binding Filtro.ApelidoCliente}" x:Name="TxtApelidoCliente"/>
                <Controls:SinacorButton
				ToolTip="{DynamicResource Bovespa.Clientes.Tooltip.PesquisarCliente}"
				TabIndex="2"
				Icon="IconButtonClient" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="290,0,0,0" x:Name="BtnSelecionarCliente"/>
                <Controls:SinacorButton	HorizontalAlignment="Left"
                           			VerticalAlignment="Top"
                           			Content="{DynamicResource Bovespa.Clientes.Label.Pesquisar}"
                           			Width="100"
                           			Margin="316,0,0,0"
									IsDefault="True"
									TabIndex="3" x:Name="BtnPesquisar"/>
                <Controls:SinacorButton	HorizontalAlignment="Left"
				Content="{DynamicResource Bovespa.Clientes.Label.NovaPesquisa}"
				Width="106"
				Margin="420,0,0,0"
				TabIndex="4"
                x:Name="BtnNovaPesquisa"/>
            </Grid>
        </Controls:SinacorExpander>
        <Controls:SinacorExpander	Header="{DynamicResource Bovespa.Clientes.Label.TiposContas}"
									Grid.Row="2"
									TabIndex="6" AllowExpand="False" IsExpanded="True">
            <Grid>
                <Controls:SinacorDataGrid x:Name="DtgTiposConta"
                                          ItemsSource="{Binding ListaTipoConta}"
                                          IsSynchronizedWithCurrentItem="True" 							 		
                                          AllowBeginInsert="True" 							 		
                                          AllowBeginUpdate="True" 							 		
                                          AllowCancelInsert="True" 							 		
                                          AllowCancelUpdate="True" 							 		
                                          AllowEndInsert="True" 							 		
                                          AllowEndUpdate="True" 							 		
                                          AllowSave="True" 							 		
                                          AllowSaveAll="True" 							 		
                                          AllowUndo="True" 							 		
                                          AllowUndoAll="True" 							 		
                                          AllowUndoLast="True" 							 		
                                          RowEditMode="AllCells"	
                                          HorizontalAlignment="Stretch"
										  Width="Auto"
										  Height="Auto"
                                          Margin="0,0,0,0"
										  TabIndex="5"
                                          AllowDelete="True"
                                          
                                          >

                    <Controls:SinacorDataGrid.Columns>
                        <Controls:Column Name="Codigo"								 				
                                         AutoAdjustWidthToContent="True" 									 				
                                         Title="Bovespa.Clientes.Label.CodCliente"
										 HorizontalCellAlignment="Right"																		 				
                                         CellUpdateTemplate="{Binding Path=CellInsertTemplate, RelativeSource={RelativeSource Self}}"
                                         DisplayMemberPath="CodigoCliente"
                                         AllowUpdate="False"
                                         AllowInsert="True"
                                         IsRequired="True"
                                         RequiredErrorMessage="Bovespa.Cliente.ExceptionMessage.CodigoClienteObrigatorio"
                                         >
                            <Controls:Column.CellInsertTemplate>
                                <DataTemplate>
                                    <Controls:SinacorInt32TextBox IsFormated="False" Integers="7" Value="{Binding CodigoCliente}" KeyUp="SinacorInt32TextBox_KeyUp" LostFocus="SinacorInt32TextBox_LostFocus" />
                                </DataTemplate>
                            </Controls:Column.CellInsertTemplate>
                        </Controls:Column>

                        <Controls:Column Name="Apelido"								 				
                                         AutoAdjustWidthToContent="True" 									 				
                                         Title="Bovespa.Clientes.Label.Apelido"
										 HorizontalCellAlignment="Left"																		 				
                                         DisplayMemberPath="ApelidoCliente">
                        </Controls:Column>

                        <Controls:Column Name="TipoCliente"								 				
                                         AutoAdjustWidthToContent="False" 									 				
                                         Width="190"
                                         Title="Bovespa.Clientes.Label.TipoCliente"
										 HorizontalCellAlignment="Left"																		 				
                                         CellUpdateTemplate="{Binding Path=CellInsertTemplate, RelativeSource={RelativeSource Self}}"
                                         DisplayMemberPath="TipoCliente" 
                                         AllowInsert="True"
                                         AllowUpdate="True"
                                         IsRequired="True"
                                         RequiredErrorMessage="Bovespa.Cliente.ExceptionMessage.TipoClienteObrigatorio"
                                         >

                        </Controls:Column>

                        <Controls:Column Name="Especialista"								 				
                                         AutoAdjustWidthToContent="True" 									 				
                                         Title="Bovespa.Clientes.Label.Especialista"
										 HorizontalCellAlignment="Center"																		 				
                                         CellUpdateTemplate="{Binding Path=CellInsertTemplate, RelativeSource={RelativeSource Self}}"
                                         DisplayMemberPath="Especialista"
                                         AllowUpdate="True"
                                         AllowInsert="True">

                        </Controls:Column>

                    </Controls:SinacorDataGrid.Columns>
                </Controls:SinacorDataGrid>

            </Grid>
        </Controls:SinacorExpander>
    </Controls:SinacorExpanderContainer>
</Controls:SinacorWindow>